/*
 * MIT License
 *
 * Copyright (c) 2023 OrdinaryRoad
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: douyin.proto

// Protobuf Java Version: 3.25.3
package tech.ordinaryroad.live.chat.client.codec.douyin.protobuf;

/**
 * Protobuf type {@code PushFrame}
 */
public final class PushFrame extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:PushFrame)
    PushFrameOrBuilder {
private static final long serialVersionUID = 0L;
  // Use PushFrame.newBuilder() to construct.
  private PushFrame(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private PushFrame() {
    headersList_ = java.util.Collections.emptyList();
    payloadEncoding_ = "";
    payloadType_ = "";
    payload_ = com.google.protobuf.ByteString.EMPTY;
  }

  @Override
  @SuppressWarnings({"unused"})
  protected Object newInstance(
      UnusedPrivateParameter unused) {
    return new PushFrame();
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return Douyin.internal_static_PushFrame_descriptor;
  }

  @Override
  protected FieldAccessorTable
      internalGetFieldAccessorTable() {
    return Douyin.internal_static_PushFrame_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            PushFrame.class, Builder.class);
  }

  public static final int SEQID_FIELD_NUMBER = 1;
  private long seqId_ = 0L;
  /**
   * <code>uint64 seqId = 1;</code>
   * @return The seqId.
   */
  @Override
  public long getSeqId() {
    return seqId_;
  }

  public static final int LOGID_FIELD_NUMBER = 2;
  private long logId_ = 0L;
  /**
   * <code>uint64 logId = 2;</code>
   * @return The logId.
   */
  @Override
  public long getLogId() {
    return logId_;
  }

  public static final int SERVICE_FIELD_NUMBER = 3;
  private long service_ = 0L;
  /**
   * <code>uint64 service = 3;</code>
   * @return The service.
   */
  @Override
  public long getService() {
    return service_;
  }

  public static final int METHOD_FIELD_NUMBER = 4;
  private long method_ = 0L;
  /**
   * <code>uint64 method = 4;</code>
   * @return The method.
   */
  @Override
  public long getMethod() {
    return method_;
  }

  public static final int HEADERSLIST_FIELD_NUMBER = 5;
  @SuppressWarnings("serial")
  private java.util.List<HeadersList> headersList_;
  /**
   * <code>repeated .HeadersList headersList = 5;</code>
   */
  @Override
  public java.util.List<HeadersList> getHeadersListList() {
    return headersList_;
  }
  /**
   * <code>repeated .HeadersList headersList = 5;</code>
   */
  @Override
  public java.util.List<? extends HeadersListOrBuilder>
      getHeadersListOrBuilderList() {
    return headersList_;
  }
  /**
   * <code>repeated .HeadersList headersList = 5;</code>
   */
  @Override
  public int getHeadersListCount() {
    return headersList_.size();
  }
  /**
   * <code>repeated .HeadersList headersList = 5;</code>
   */
  @Override
  public HeadersList getHeadersList(int index) {
    return headersList_.get(index);
  }
  /**
   * <code>repeated .HeadersList headersList = 5;</code>
   */
  @Override
  public HeadersListOrBuilder getHeadersListOrBuilder(
      int index) {
    return headersList_.get(index);
  }

  public static final int PAYLOADENCODING_FIELD_NUMBER = 6;
  @SuppressWarnings("serial")
  private volatile Object payloadEncoding_ = "";
  /**
   * <code>string payloadEncoding = 6;</code>
   * @return The payloadEncoding.
   */
  @Override
  public String getPayloadEncoding() {
    Object ref = payloadEncoding_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      payloadEncoding_ = s;
      return s;
    }
  }
  /**
   * <code>string payloadEncoding = 6;</code>
   * @return The bytes for payloadEncoding.
   */
  @Override
  public com.google.protobuf.ByteString
      getPayloadEncodingBytes() {
    Object ref = payloadEncoding_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      payloadEncoding_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PAYLOADTYPE_FIELD_NUMBER = 7;
  @SuppressWarnings("serial")
  private volatile Object payloadType_ = "";
  /**
   * <code>string payloadType = 7;</code>
   * @return The payloadType.
   */
  @Override
  public String getPayloadType() {
    Object ref = payloadType_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      payloadType_ = s;
      return s;
    }
  }
  /**
   * <code>string payloadType = 7;</code>
   * @return The bytes for payloadType.
   */
  @Override
  public com.google.protobuf.ByteString
      getPayloadTypeBytes() {
    Object ref = payloadType_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      payloadType_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PAYLOAD_FIELD_NUMBER = 8;
  private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
  /**
   * <code>bytes payload = 8;</code>
   * @return The payload.
   */
  @Override
  public com.google.protobuf.ByteString getPayload() {
    return payload_;
  }

  private byte memoizedIsInitialized = -1;
  @Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (seqId_ != 0L) {
      output.writeUInt64(1, seqId_);
    }
    if (logId_ != 0L) {
      output.writeUInt64(2, logId_);
    }
    if (service_ != 0L) {
      output.writeUInt64(3, service_);
    }
    if (method_ != 0L) {
      output.writeUInt64(4, method_);
    }
    for (int i = 0; i < headersList_.size(); i++) {
      output.writeMessage(5, headersList_.get(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadEncoding_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, payloadEncoding_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadType_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, payloadType_);
    }
    if (!payload_.isEmpty()) {
      output.writeBytes(8, payload_);
    }
    getUnknownFields().writeTo(output);
  }

  @Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (seqId_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeUInt64Size(1, seqId_);
    }
    if (logId_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeUInt64Size(2, logId_);
    }
    if (service_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeUInt64Size(3, service_);
    }
    if (method_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeUInt64Size(4, method_);
    }
    for (int i = 0; i < headersList_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(5, headersList_.get(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadEncoding_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, payloadEncoding_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadType_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, payloadType_);
    }
    if (!payload_.isEmpty()) {
      size += com.google.protobuf.CodedOutputStream
        .computeBytesSize(8, payload_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @Override
  public boolean equals(final Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof PushFrame)) {
      return super.equals(obj);
    }
    PushFrame other = (PushFrame) obj;

    if (getSeqId()
        != other.getSeqId()) return false;
    if (getLogId()
        != other.getLogId()) return false;
    if (getService()
        != other.getService()) return false;
    if (getMethod()
        != other.getMethod()) return false;
    if (!getHeadersListList()
        .equals(other.getHeadersListList())) return false;
    if (!getPayloadEncoding()
        .equals(other.getPayloadEncoding())) return false;
    if (!getPayloadType()
        .equals(other.getPayloadType())) return false;
    if (!getPayload()
        .equals(other.getPayload())) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + SEQID_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getSeqId());
    hash = (37 * hash) + LOGID_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getLogId());
    hash = (37 * hash) + SERVICE_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getService());
    hash = (37 * hash) + METHOD_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getMethod());
    if (getHeadersListCount() > 0) {
      hash = (37 * hash) + HEADERSLIST_FIELD_NUMBER;
      hash = (53 * hash) + getHeadersListList().hashCode();
    }
    hash = (37 * hash) + PAYLOADENCODING_FIELD_NUMBER;
    hash = (53 * hash) + getPayloadEncoding().hashCode();
    hash = (37 * hash) + PAYLOADTYPE_FIELD_NUMBER;
    hash = (53 * hash) + getPayloadType().hashCode();
    hash = (37 * hash) + PAYLOAD_FIELD_NUMBER;
    hash = (53 * hash) + getPayload().hashCode();
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static PushFrame parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static PushFrame parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static PushFrame parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static PushFrame parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static PushFrame parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static PushFrame parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static PushFrame parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static PushFrame parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public static PushFrame parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static PushFrame parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static PushFrame parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static PushFrame parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(PushFrame prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @Override
  protected Builder newBuilderForType(
      BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code PushFrame}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:PushFrame)
      PushFrameOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return Douyin.internal_static_PushFrame_descriptor;
    }

    @Override
    protected FieldAccessorTable
        internalGetFieldAccessorTable() {
      return Douyin.internal_static_PushFrame_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              PushFrame.class, Builder.class);
    }

    // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.PushFrame.newBuilder()
    private Builder() {

    }

    private Builder(
        BuilderParent parent) {
      super(parent);

    }
    @Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      seqId_ = 0L;
      logId_ = 0L;
      service_ = 0L;
      method_ = 0L;
      if (headersListBuilder_ == null) {
        headersList_ = java.util.Collections.emptyList();
      } else {
        headersList_ = null;
        headersListBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000010);
      payloadEncoding_ = "";
      payloadType_ = "";
      payload_ = com.google.protobuf.ByteString.EMPTY;
      return this;
    }

    @Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return Douyin.internal_static_PushFrame_descriptor;
    }

    @Override
    public PushFrame getDefaultInstanceForType() {
      return PushFrame.getDefaultInstance();
    }

    @Override
    public PushFrame build() {
      PushFrame result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @Override
    public PushFrame buildPartial() {
      PushFrame result = new PushFrame(this);
      buildPartialRepeatedFields(result);
      if (bitField0_ != 0) { buildPartial0(result); }
      onBuilt();
      return result;
    }

    private void buildPartialRepeatedFields(PushFrame result) {
      if (headersListBuilder_ == null) {
        if (((bitField0_ & 0x00000010) != 0)) {
          headersList_ = java.util.Collections.unmodifiableList(headersList_);
          bitField0_ = (bitField0_ & ~0x00000010);
        }
        result.headersList_ = headersList_;
      } else {
        result.headersList_ = headersListBuilder_.build();
      }
    }

    private void buildPartial0(PushFrame result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.seqId_ = seqId_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.logId_ = logId_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.service_ = service_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.method_ = method_;
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.payloadEncoding_ = payloadEncoding_;
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.payloadType_ = payloadType_;
      }
      if (((from_bitField0_ & 0x00000080) != 0)) {
        result.payload_ = payload_;
      }
    }

    @Override
    public Builder clone() {
      return super.clone();
    }
    @Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.setField(field, value);
    }
    @Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }
    @Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }
    @Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, Object value) {
      return super.setRepeatedField(field, index, value);
    }
    @Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.addRepeatedField(field, value);
    }
    @Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof PushFrame) {
        return mergeFrom((PushFrame)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(PushFrame other) {
      if (other == PushFrame.getDefaultInstance()) return this;
      if (other.getSeqId() != 0L) {
        setSeqId(other.getSeqId());
      }
      if (other.getLogId() != 0L) {
        setLogId(other.getLogId());
      }
      if (other.getService() != 0L) {
        setService(other.getService());
      }
      if (other.getMethod() != 0L) {
        setMethod(other.getMethod());
      }
      if (headersListBuilder_ == null) {
        if (!other.headersList_.isEmpty()) {
          if (headersList_.isEmpty()) {
            headersList_ = other.headersList_;
            bitField0_ = (bitField0_ & ~0x00000010);
          } else {
            ensureHeadersListIsMutable();
            headersList_.addAll(other.headersList_);
          }
          onChanged();
        }
      } else {
        if (!other.headersList_.isEmpty()) {
          if (headersListBuilder_.isEmpty()) {
            headersListBuilder_.dispose();
            headersListBuilder_ = null;
            headersList_ = other.headersList_;
            bitField0_ = (bitField0_ & ~0x00000010);
            headersListBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getHeadersListFieldBuilder() : null;
          } else {
            headersListBuilder_.addAllMessages(other.headersList_);
          }
        }
      }
      if (!other.getPayloadEncoding().isEmpty()) {
        payloadEncoding_ = other.payloadEncoding_;
        bitField0_ |= 0x00000020;
        onChanged();
      }
      if (!other.getPayloadType().isEmpty()) {
        payloadType_ = other.payloadType_;
        bitField0_ |= 0x00000040;
        onChanged();
      }
      if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) {
        setPayload(other.getPayload());
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @Override
    public final boolean isInitialized() {
      return true;
    }

    @Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 8: {
              seqId_ = input.readUInt64();
              bitField0_ |= 0x00000001;
              break;
            } // case 8
            case 16: {
              logId_ = input.readUInt64();
              bitField0_ |= 0x00000002;
              break;
            } // case 16
            case 24: {
              service_ = input.readUInt64();
              bitField0_ |= 0x00000004;
              break;
            } // case 24
            case 32: {
              method_ = input.readUInt64();
              bitField0_ |= 0x00000008;
              break;
            } // case 32
            case 42: {
              HeadersList m =
                  input.readMessage(
                      HeadersList.parser(),
                      extensionRegistry);
              if (headersListBuilder_ == null) {
                ensureHeadersListIsMutable();
                headersList_.add(m);
              } else {
                headersListBuilder_.addMessage(m);
              }
              break;
            } // case 42
            case 50: {
              payloadEncoding_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000020;
              break;
            } // case 50
            case 58: {
              payloadType_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000040;
              break;
            } // case 58
            case 66: {
              payload_ = input.readBytes();
              bitField0_ |= 0x00000080;
              break;
            } // case 66
            default: {
              if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                done = true; // was an endgroup tag
              }
              break;
            } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }
    private int bitField0_;

    private long seqId_ ;
    /**
     * <code>uint64 seqId = 1;</code>
     * @return The seqId.
     */
    @Override
    public long getSeqId() {
      return seqId_;
    }
    /**
     * <code>uint64 seqId = 1;</code>
     * @param value The seqId to set.
     * @return This builder for chaining.
     */
    public Builder setSeqId(long value) {

      seqId_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * <code>uint64 seqId = 1;</code>
     * @return This builder for chaining.
     */
    public Builder clearSeqId() {
      bitField0_ = (bitField0_ & ~0x00000001);
      seqId_ = 0L;
      onChanged();
      return this;
    }

    private long logId_ ;
    /**
     * <code>uint64 logId = 2;</code>
     * @return The logId.
     */
    @Override
    public long getLogId() {
      return logId_;
    }
    /**
     * <code>uint64 logId = 2;</code>
     * @param value The logId to set.
     * @return This builder for chaining.
     */
    public Builder setLogId(long value) {

      logId_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * <code>uint64 logId = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearLogId() {
      bitField0_ = (bitField0_ & ~0x00000002);
      logId_ = 0L;
      onChanged();
      return this;
    }

    private long service_ ;
    /**
     * <code>uint64 service = 3;</code>
     * @return The service.
     */
    @Override
    public long getService() {
      return service_;
    }
    /**
     * <code>uint64 service = 3;</code>
     * @param value The service to set.
     * @return This builder for chaining.
     */
    public Builder setService(long value) {

      service_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     * <code>uint64 service = 3;</code>
     * @return This builder for chaining.
     */
    public Builder clearService() {
      bitField0_ = (bitField0_ & ~0x00000004);
      service_ = 0L;
      onChanged();
      return this;
    }

    private long method_ ;
    /**
     * <code>uint64 method = 4;</code>
     * @return The method.
     */
    @Override
    public long getMethod() {
      return method_;
    }
    /**
     * <code>uint64 method = 4;</code>
     * @param value The method to set.
     * @return This builder for chaining.
     */
    public Builder setMethod(long value) {

      method_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     * <code>uint64 method = 4;</code>
     * @return This builder for chaining.
     */
    public Builder clearMethod() {
      bitField0_ = (bitField0_ & ~0x00000008);
      method_ = 0L;
      onChanged();
      return this;
    }

    private java.util.List<HeadersList> headersList_ =
      java.util.Collections.emptyList();
    private void ensureHeadersListIsMutable() {
      if (!((bitField0_ & 0x00000010) != 0)) {
        headersList_ = new java.util.ArrayList<HeadersList>(headersList_);
        bitField0_ |= 0x00000010;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        HeadersList, HeadersList.Builder, HeadersListOrBuilder> headersListBuilder_;

    /**
     * <code>repeated .HeadersList headersList = 5;</code>
     */
    public java.util.List<HeadersList> getHeadersListList() {
      if (headersListBuilder_ == null) {
        return java.util.Collections.unmodifiableList(headersList_);
      } else {
        return headersListBuilder_.getMessageList();
      }
    }
    /**
     * <code>repeated .HeadersList headersList = 5;</code>
     */
    public int getHeadersListCount() {
      if (headersListBuilder_ == null) {
        return headersList_.size();
      } else {
        return headersListBuilder_.getCount();
      }
    }
    /**
     * <code>repeated .HeadersList headersList = 5;</code>
     */
    public HeadersList getHeadersList(int index) {
      if (headersListBuilder_ == null) {
        return headersList_.get(index);
      } else {
        return headersListBuilder_.getMessage(index);
      }
    }
    /**
     * <code>repeated .HeadersList headersList = 5;</code>
     */
    public Builder setHeadersList(
        int index, HeadersList value) {
      if (headersListBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureHeadersListIsMutable();
        headersList_.set(index, value);
        onChanged();
      } else {
        headersListBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .HeadersList headersList = 5;</code>
     */
    public Builder setHeadersList(
        int index, HeadersList.Builder builderForValue) {
      if (headersListBuilder_ == null) {
        ensureHeadersListIsMutable();
        headersList_.set(index, builderForValue.build());
        onChanged();
      } else {
        headersListBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .HeadersList headersList = 5;</code>
     */
    public Builder addHeadersList(HeadersList value) {
      if (headersListBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureHeadersListIsMutable();
        headersList_.add(value);
        onChanged();
      } else {
        headersListBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <code>repeated .HeadersList headersList = 5;</code>
     */
    public Builder addHeadersList(
        int index, HeadersList value) {
      if (headersListBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureHeadersListIsMutable();
        headersList_.add(index, value);
        onChanged();
      } else {
        headersListBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .HeadersList headersList = 5;</code>
     */
    public Builder addHeadersList(
        HeadersList.Builder builderForValue) {
      if (headersListBuilder_ == null) {
        ensureHeadersListIsMutable();
        headersList_.add(builderForValue.build());
        onChanged();
      } else {
        headersListBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .HeadersList headersList = 5;</code>
     */
    public Builder addHeadersList(
        int index, HeadersList.Builder builderForValue) {
      if (headersListBuilder_ == null) {
        ensureHeadersListIsMutable();
        headersList_.add(index, builderForValue.build());
        onChanged();
      } else {
        headersListBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .HeadersList headersList = 5;</code>
     */
    public Builder addAllHeadersList(
        Iterable<? extends HeadersList> values) {
      if (headersListBuilder_ == null) {
        ensureHeadersListIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, headersList_);
        onChanged();
      } else {
        headersListBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <code>repeated .HeadersList headersList = 5;</code>
     */
    public Builder clearHeadersList() {
      if (headersListBuilder_ == null) {
        headersList_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000010);
        onChanged();
      } else {
        headersListBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>repeated .HeadersList headersList = 5;</code>
     */
    public Builder removeHeadersList(int index) {
      if (headersListBuilder_ == null) {
        ensureHeadersListIsMutable();
        headersList_.remove(index);
        onChanged();
      } else {
        headersListBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <code>repeated .HeadersList headersList = 5;</code>
     */
    public HeadersList.Builder getHeadersListBuilder(
        int index) {
      return getHeadersListFieldBuilder().getBuilder(index);
    }
    /**
     * <code>repeated .HeadersList headersList = 5;</code>
     */
    public HeadersListOrBuilder getHeadersListOrBuilder(
        int index) {
      if (headersListBuilder_ == null) {
        return headersList_.get(index);  } else {
        return headersListBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <code>repeated .HeadersList headersList = 5;</code>
     */
    public java.util.List<? extends HeadersListOrBuilder>
         getHeadersListOrBuilderList() {
      if (headersListBuilder_ != null) {
        return headersListBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(headersList_);
      }
    }
    /**
     * <code>repeated .HeadersList headersList = 5;</code>
     */
    public HeadersList.Builder addHeadersListBuilder() {
      return getHeadersListFieldBuilder().addBuilder(
          HeadersList.getDefaultInstance());
    }
    /**
     * <code>repeated .HeadersList headersList = 5;</code>
     */
    public HeadersList.Builder addHeadersListBuilder(
        int index) {
      return getHeadersListFieldBuilder().addBuilder(
          index, HeadersList.getDefaultInstance());
    }
    /**
     * <code>repeated .HeadersList headersList = 5;</code>
     */
    public java.util.List<HeadersList.Builder>
         getHeadersListBuilderList() {
      return getHeadersListFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        HeadersList, HeadersList.Builder, HeadersListOrBuilder>
        getHeadersListFieldBuilder() {
      if (headersListBuilder_ == null) {
        headersListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            HeadersList, HeadersList.Builder, HeadersListOrBuilder>(
                headersList_,
                ((bitField0_ & 0x00000010) != 0),
                getParentForChildren(),
                isClean());
        headersList_ = null;
      }
      return headersListBuilder_;
    }

    private Object payloadEncoding_ = "";
    /**
     * <code>string payloadEncoding = 6;</code>
     * @return The payloadEncoding.
     */
    public String getPayloadEncoding() {
      Object ref = payloadEncoding_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        payloadEncoding_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string payloadEncoding = 6;</code>
     * @return The bytes for payloadEncoding.
     */
    public com.google.protobuf.ByteString
        getPayloadEncodingBytes() {
      Object ref = payloadEncoding_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        payloadEncoding_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string payloadEncoding = 6;</code>
     * @param value The payloadEncoding to set.
     * @return This builder for chaining.
     */
    public Builder setPayloadEncoding(
        String value) {
      if (value == null) { throw new NullPointerException(); }
      payloadEncoding_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     * <code>string payloadEncoding = 6;</code>
     * @return This builder for chaining.
     */
    public Builder clearPayloadEncoding() {
      payloadEncoding_ = getDefaultInstance().getPayloadEncoding();
      bitField0_ = (bitField0_ & ~0x00000020);
      onChanged();
      return this;
    }
    /**
     * <code>string payloadEncoding = 6;</code>
     * @param value The bytes for payloadEncoding to set.
     * @return This builder for chaining.
     */
    public Builder setPayloadEncodingBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      payloadEncoding_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }

    private Object payloadType_ = "";
    /**
     * <code>string payloadType = 7;</code>
     * @return The payloadType.
     */
    public String getPayloadType() {
      Object ref = payloadType_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        payloadType_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string payloadType = 7;</code>
     * @return The bytes for payloadType.
     */
    public com.google.protobuf.ByteString
        getPayloadTypeBytes() {
      Object ref = payloadType_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        payloadType_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string payloadType = 7;</code>
     * @param value The payloadType to set.
     * @return This builder for chaining.
     */
    public Builder setPayloadType(
        String value) {
      if (value == null) { throw new NullPointerException(); }
      payloadType_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     * <code>string payloadType = 7;</code>
     * @return This builder for chaining.
     */
    public Builder clearPayloadType() {
      payloadType_ = getDefaultInstance().getPayloadType();
      bitField0_ = (bitField0_ & ~0x00000040);
      onChanged();
      return this;
    }
    /**
     * <code>string payloadType = 7;</code>
     * @param value The bytes for payloadType to set.
     * @return This builder for chaining.
     */
    public Builder setPayloadTypeBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      payloadType_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }

    private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
    /**
     * <code>bytes payload = 8;</code>
     * @return The payload.
     */
    @Override
    public com.google.protobuf.ByteString getPayload() {
      return payload_;
    }
    /**
     * <code>bytes payload = 8;</code>
     * @param value The payload to set.
     * @return This builder for chaining.
     */
    public Builder setPayload(com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      payload_ = value;
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     * <code>bytes payload = 8;</code>
     * @return This builder for chaining.
     */
    public Builder clearPayload() {
      bitField0_ = (bitField0_ & ~0x00000080);
      payload_ = getDefaultInstance().getPayload();
      onChanged();
      return this;
    }
    @Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:PushFrame)
  }

  // @@protoc_insertion_point(class_scope:PushFrame)
  private static final PushFrame DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new PushFrame();
  }

  public static PushFrame getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<PushFrame>
      PARSER = new com.google.protobuf.AbstractParser<PushFrame>() {
    @Override
    public PushFrame parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      Builder builder = newBuilder();
      try {
        builder.mergeFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(builder.buildPartial());
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e)
            .setUnfinishedMessage(builder.buildPartial());
      }
      return builder.buildPartial();
    }
  };

  public static com.google.protobuf.Parser<PushFrame> parser() {
    return PARSER;
  }

  @Override
  public com.google.protobuf.Parser<PushFrame> getParserForType() {
    return PARSER;
  }

  @Override
  public PushFrame getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

